﻿#parse("partials/header.html") #parse("partials/sidebar.html")
<link rel="stylesheet" type="text/css" href="/Styles/smart_wizard.css" media="all" />
<script src="${rooturl}Scripts/jquery.blockUI.js" type="text/javascript"></script>
<script type="text/javascript" src="/Scripts/jquery.smartWizard-2.0.min.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function () {


        var oTable = $('#tblWorkFlow').dataTable({
            //"sScrollX": "150%",
            //"bScrollCollapse": true,
            "bSort": false,
            "bAutoWidth": false,
            //"sPaginationType": "full_numbers",
            "bProcessing": true,
            "bServerSide": true,
            "bFilter": false,
            "bPaginate":false,
            //"sAjaxSource": rooturl + "master/doctors/GetListManager",
            "aoColumns": [
                            { "mDataProp": "Id" },
                            { "mDataProp": "CodeValue" },
                            { "mDataProp": "NameValue" },
                            { "mDataProp": "Phone" },
                            { "mDataProp": "Mobile" }
                        ],
            "aoColumnDefs": [
                                {
                                    "fnRender": function (o) {
                                        return "<center> <a title='Edit Supplier' class='supplier' href='javascript:void(0)' id='" + o.aData['Id'] + "' ><img src='/images/Icons/pencil.png'/></a> <a class='deleteconfirm' style='cursor:pointer' title='Delete Record' deleteid='" + o.aData['Id'] + "'><img src='/images/Icons/eraser.png'/></a></center>";
                                    },
                                    "aTargets": [0]
                                }
                        ],
            "fnServerData": function (sSource, aoData, fnCallback) {
                aoData.push({ "name": "wfmaster", "value": $('#wfTemplete').val() });

                jQuery.ajax({
                    "dataType": 'json',
                    "type": "GET",
                    "url": "getlistworkflowtempletefromworkflowmastertemplete/",
                    "data": aoData,
                    "success": fnCallback

                });
            }
        });


        $('#wfTemplete').change(function () { oTable.fnDraw(); });

        jQuery("#formID").submit(
            function () {
                if (jQuery("#formID").valid() == true) {
                    jQuery.blockUI();
                    var post_data = jQuery(this).serialize();
                    var form_action = jQuery(this).attr("action");
                    var form_method = jQuery(this).attr("method");
                    jQuery.ajax({
                        type: form_method,
                        url: form_action,
                        cache: false,
                        dataType: "json",
                        data: post_data,
                        success: function (data) {
                            jQuery("#notif").html(data['strNotification']);
                            jQuery.unblockUI();
                        },
                        error: function (data) {
                            jQuery.unblockUI();
                        },
                        complete: function () {

                        }
                    });
                }
                return false;
            });
    });


</script>
<div id="mws-container" class="clearfix">
    <div class="container">
        <div class="mws-panel grid_8">
            <div class="title-caption">
                <h5>
                    $headerinformation - Workflow</h5>
            </div>
           
               
               
            <div class="mws-panel grid_8">
                <div class="mws-panel-header">
                    <span class="mws-i-24 i-table-1">Create Workflow</span>
                </div>
                <div class="mws-panel-body">
                 <div class="mws-panel-toolbar top clearfix">
                    <ul>
                        <li><a class="mws-ic-16 ic-add" href="/purchasing/purchaserequisition/createpurchaserequisition/"
                            title="Accept">Add Purchase Request</a></li>
                        
                        <li><a class="mws-ic-16 ic-add" href="/workflow/mastertemplete/"
                            title="Accept">Workflow Master Templete</a></li>
                    </ul>
                </div>
                    <div id="notif">
                        $Notification
                    </div>
                    <div class="mws-form">
                        <div class="grid_8">
                            <div class="mws-form-inline">
                                <br />
                                <div class="mws-form-row">
                                    <label>
                                        Document Type</label>
                                    <div class="mws-form-item large">
                                        <div class="mws-form-cols clearfix">
                                            <div class="mws-form-col-5-8 alpha">
                                                <div class="mws-form-item">
                                                    Purchase Requisition
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                 <div class="mws-form-row">
                                    <label>
                                        Set Default</label>
                                    <div class="mws-form-item large">
                                        <div class="mws-form-cols clearfix">
                                            <div class="mws-form-col-5-8 alpha">
                                                <div class="mws-form-item">
                                                    <input id="cbDefault" name="cbDefault" type="checkbox" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label>
                                        Approval Template</label>
                                    <div class="mws-form-item large">
                                        <div class="mws-form-cols clearfix">
                                            <div class="mws-form-col-3-8 alpha">
                                                <div class="mws-form-item">
                                                    $ddlWfTemplete
                                                    <!--<select>
                                                                <option>Default (Organization)</option>
                                                                <option>Purchase Order 1</option>
                                                                <option>Purchase Order 2</option>
                                                            </select>-->
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label>
                                        &nbsp;</label>
                                    <div class="mws-form-item large">
                                        <div class="mws-form-cols clearfix">
                                            <div class="mws-form-col-5-8 alpha">
                                                <div class="mws-form-item">
                                                    <input class="mws-button green small ButtonSearchPresentArea" 
                                                        name="btnAddPerson" value="   Add new Person  " type="button"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label>
                                        &nbsp;</label>
                                    <div class="mws-form-item large">
                                        <div class="mws-form-cols clearfix">
                                            <div class="mws-form-col-7-8 alpha">
                                                <div class="mws-form-item">
                                                   
                                                    <table class="mws-table" id="tblWorkFlow">
                                                        <thead>
                                                            <tr>
                                                                <th style="text-align: center; width: 100px">
                                                                    Action
                                                                </th>
                                                                <th style="text-align: center; width: 20px">
                                                                    Sequence
                                                                </th>
                                                                <th style="text-align: center;">
                                                                    Name
                                                                </th>
                                                            </tr>
                                                        </thead>
                                                        <tbody id="listAction">
                                                        </tbody>
                                                    </table>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="clear15">
                        </div>
                        <div class="mws-button-row">
                            <input name="btnAction" class="mws-button red" type="submit" value="Save as New Template" />
                        </div>
                    </div>
                </div>
            </div>
             
                
          
        </div>
    </div>
#parse("partials/footer.html")